home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / Eudora 1.3.1 / source / Include / mywindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-16  |  4.3 KB  |  93 lines  |  [TEXT/MPS ]

  1. /* Copyright (c) 1990-1992 by the University of Illinois Board of Trustees */
  2. /**********************************************************************
  3.  * my own window package
  4.  **********************************************************************/
  5. typedef struct
  6. {
  7.     union
  8.     {
  9.         DialogRecord dRec;            /* the dialog manager record */
  10.         WindowRecord wRec;            /* and the quickdraw window structure */
  11.     } winUnion;
  12. #define qWindow winUnion.wRec
  13. #define qDialog winUnion.dRec
  14.     Boolean isDialog;                 /* is this a dialog? */
  15.     Boolean isRunt;                     /* should not grow */
  16.     ControlHandle vBar;             /* vertical scroll bar, if any */
  17.     ControlHandle hBar;             /* horizontal scroll bar, if any */
  18.     int             vMax;
  19.     int             hMax;
  20.     Byte            hPitch;
  21.     Byte            vPitch;
  22.     short topMargin;                    /* distance from top of window to top of contR */
  23.     Rect            contR;                    /* real content rectangle */
  24.     Boolean         isActive;         /* the window is topmost */
  25.     Boolean         isDirty;            /* the contents of the window are dirty */
  26.     Boolean         hasSelection; /* the window contains a selection */
  27.     void (*update)();                 /* handle update events */
  28.     void (*click)();                    /* handle clicks in the content region */
  29.     void (*activate)();             /* handle activation/deactivation */
  30.     Boolean (*scroll)();            /* handle scrolling in lieu of normal mechanism */
  31.     void (*didResize)();            /* act after a window has been resized */
  32.     Boolean (*menu)();                /* handle a menu selection */
  33.     Boolean (*close)();             /* close the window */
  34.     Boolean (*key)();                 /* we saw a keystroke */
  35.     Boolean (*position)();        /* save/restore window position */
  36.     void (*cursor)();                 /* set the cursor  and mouse region */
  37.     void (*button)();                 /* a button was hit */
  38.     void (*showInsert)();         /* show the insertion point */
  39.     void (*help)();                     /* show help balloon for the window */
  40.     void (*gonnaShow)();            /* get ready to become visible */
  41.     void (*textChanged)();        /* called after a text has changed */
  42.     void (*zoomSize)();                /* size the zoom rectangle */
  43.     Boolean (*app1)();                /* handle an app1 (page keys) */
  44.     Boolean (*hit)();                 /* for dialog windows */
  45.     TEHandle txe;                         /* handle to textedit, if any */
  46.     TEHandle ste;                            /* handle to scrolling TE field, if any */
  47.     Boolean ro;                             /* current txe is ro */
  48.     Boolean dontControl;            /* leave control handling to the click routine */
  49.     Boolean saveSize;                 /* save the size when the window is closed */
  50.     Boolean hot;                            /* pass click through after activate */
  51.     Point minSize;                        /* how small to allow the window to be */
  52.     Boolean inUse;                        /* is the window in use? */
  53. } MyWindow, *MyWindowPtr;
  54.  
  55. /**********************************************************************
  56.  * prototypes
  57.  **********************************************************************/
  58. MyWindowPtr GetNewMyWindow(short resId,UPtr wStorage,WindowPtr behind,Boolean hBar, Boolean vBar);
  59. void UpdateMyWindow(MyWindowPtr win);
  60. void ScrollIt(MyWindowPtr win,int deltaH,int deltaV);
  61. void EraseUpdateRgn(MyWindowPtr win);
  62. void DragMyWindow(MyWindowPtr win,Point thePt);
  63. void GrowMyWindow(MyWindowPtr win,Point thePt);
  64. void ZoomMyWindow(MyWindowPtr win,Point thePt,int partCode);
  65. void OffsetWindow(WindowPtr win);
  66. void MyWindowDidResize(MyWindowPtr win,Rect *oldContR);
  67. void MoveMyCntl(MyWindowPtr win,ControlHandle cntl,int h,int v,int w,int t);
  68. short IncMyCntl(ControlHandle cntl,short inc);
  69. void ScrollMyWindow(MyWindowPtr win,int h,int v);
  70. void MyWindowMaxes(MyWindowPtr win,int hMax,int vMax);
  71. int BarMax(ControlHandle cntl,int max,int winSize,int pitch);
  72. pascal void ScrollAction(ControlHandle theCtl,short partCode);
  73. void ActivateMyWindow(MyWindowPtr win,Boolean active);
  74. void InvertLine(MyWindowPtr win,int line);
  75. Boolean CloseMyWindow(MyWindowPtr win);
  76. void GoAwayMyWindow(WindowPtr win,Point pt);
  77. void DrawMyGrow(MyWindowPtr win);
  78. #define IsMyWindow(wp) ((wp) && ((MyWindowPtr)wp)->qWindow.windowKind==dialogKind &&\
  79.                                                 ((MyWindowPtr)wp)->qWindow.refCon==CREATOR || \
  80.                                                 ((MyWindowPtr)wp)->qWindow.windowKind>=userKind)
  81. void InvalContent(MyWindowPtr win);
  82. void ShowMyWindow(MyWindowPtr win);
  83. void InfiniteClip(MyWindowPtr win);
  84. pascal Boolean MyClikLoop(void);
  85. short CalcCntlInc(ControlHandle cntl,short tentativeInc);
  86. TEHandle WinTEH(MyWindowPtr win);
  87. Boolean ScrollIsH(ControlHandle cntl);
  88. void UsingWindow(MyWindowPtr win);
  89. void NotUsingWindow(MyWindowPtr win);
  90. void NotUsingAllWindows(void);
  91. void FigureZoom(MyWindowPtr win);
  92. short GDIndexOf(GDHandle gd);
  93.